<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()
</script>

<template>
  <div class="home">
    <div class="hero">
      <h1>欢迎使用记事本</h1>
      <p>简单高效的笔记管理工具</p>
      <div class="actions">
        <button class="primary" @click="router.push('/notes')">
          <i>📋</i> 查看所有笔记
        </button>
        <button class="secondary" @click="router.push('/notes/edit')">
          <i>✏️</i> 新建笔记
        </button>
      </div>
    </div>
  </div>
</template>

<style scoped>
.home {
  text-align: center;
  padding: 2rem;
}

.hero {
  max-width: 600px;
  margin: 2rem auto;
  padding: 3rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.hero h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 2rem;
}

.actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 24px;
  font-size: 1.1rem;
}

button.secondary {
  background-color: var(--secondary-color);
}

i {
  font-style: normal;
}
</style>
